package mil.af.amc.adpetracker.service;

import mil.af.amc.adpetracker.model.Ros;

import java.sql.Date;
import java.util.List;
import java.util.Map;

/**
 * Interface for Report Of Survey service
 *
 * @author TSgt Jason Ferguson
 */

public interface RosService {

    /**
     * Retrieve a ROS by its unique ID
     *
     * @param rosPackageId
     * @return
     */
    Ros getById(int rosPackageId);

    /**
     * Create a new Report of Survey or Waiver
     *
     * @param map   Map of details for new Report of Survey
     */
    void createRos(Map map) throws ServiceException;

    /**
     * Edit an existing Report of Survey/Waiver
     *
     * @param map       Map of updated values for Report of Survey
     * @return      Updated Ros object
     */
    Ros editRos(Map map) throws ServiceException;

    /**
     * Delete an existing ReportOfSurvey
     *
     * @param rosId     int representing the unique id of the ROS
     */
    void deleteRos(int rosId) throws ServiceException;

    /**
     * Close (Complete) a ROS/Waiver package
     * @param date
     */
    void closeRos(int rosId) throws ServiceException;

    /**
     * Close a ROS/Waiver package given a ROS unique id and a given date
     * 
     * @param rosId
     * @param date
     * @throws ServiceException
     */
    void closeRos(int rosId, Date date) throws ServiceException;

    /**
     * Return a list of ALL ROS objects
     *
     * @return  a List of all ROS objects (for all accounts)
     * @throws ServiceException
     */
    List<Ros> getAll() throws ServiceException;

    /**
     * Return a list of all ROS objects for an ADPE account by the ADPE account unique id
     *
     * @param adpeAccountId     an int representing the unique id of the AdpeAccount
     * @return      a List of Ros objects for the Adpe Account or empty list
     * @throws ServiceException
     */
    List<Ros> getAll(int adpeAccountId) throws ServiceException;
}
